import bs4 as bs
import urllib.request
import getplaylistnumber as gpln

num = str(gpln.getplnum())

# 下载网页

# 发出请求，获取html
html_byte = urllib.request.urlopen("https://music.163.com/#/my/m/music/playlist?id=" + num)
# 获取的html内容是字节，将其转化为字符串
html_text = bytes.decode(html_byte.read())
# 用BeautifulSoup解析html
obj = bs.BeautifulSoup(html_byte.read(), 'html.parser')
